/**
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"EE88D2DF-E898-4DB2-9EB5-5C6073A31EBE"}
 */
function btn_aceptar(event) {
	
	databaseManager.saveData();
	var win = controller.getWindow();
	win.destroy();
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"51C96D03-1058-412F-BB95-0855FBE178E9"}
 */
function btn_cancelar(event) {
	
	databaseManager.revertEditedRecords();
	var win = controller.getWindow();
	win.destroy();
	
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 *
 * @properties={typeid:24,uuid:"0D82CDDF-DDF1-4D33-8C3E-A64E457D4BD5"}
 */
function btn_eliminar(event) {
	
	var success = plugins.dialogs.showWarningDialog("Eliminar Registro","¿Está seguro de querer eliminar este registro?","Aceptar", "Candelar");
	if (success == "Aceptar"){
		foundset.deleteRecord(foundset.getSelectedRecord());
		
	}else{
		return;
	}
}
